<template>
  <div class="contentDiv">
    <div>
      <div>孙子</div>
      {{ customVal.name }}
      {{ ageGs }}
      {{$globalFun.pageNum(0)}}
    </div>
  </div>
</template>

<script setup>
import { onMounted, ref, inject,getCurrentInstance  } from "vue";
const { proxy } = getCurrentInstance()
const customVal = inject("customVal");
const ageGs = inject("ageChild");
ageGs.value = 23;
console.log(proxy.$globalFun.pageNum(0));

</script>

<style lang="scss" scoped></style>
